<?php 
    session_start();
    header("Content-type:text/html;charset=utf-8");

  

    $conn = 	$conn = mysqli_connect('127.0.0.1','root','pwd','admin',3306);//链接数据库('localhost','hotel','vw8jj2','shop',3308);
    mysqli_set_charset($conn,'utf8');

    $sql_select="select imgdata from img";
    
    $res = mysqli_query($conn,$sql_select);
//取出
while( $row = mysqli_fetch_assoc($res)){
  echo "<img src=$row['imgdata']/>";
}

?>